package _17读写案例_复制图片;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\黑马java培训班\\代码\\itcast\\JavaSE\\day10\\abd\\aa\\bg.jpg");
        FileOutputStream fos = new FileOutputStream("D:\\黑马java培训班\\代码\\itcast\\JavaSE\\day10\\abd\\bg.jpg");
        int readLength;
        byte[] bytes = new byte[1024];
        while ((readLength=fis.read(bytes))!=-1){
            fos.write(bytes,0,readLength);
        }
        fos.close();
        fis.close();
    }
}
